package util;

/**
 * @Author liudongs
 * @Date 2020/12/2
 * @Time 16:52
 * @Version 1.0
 * @E-mail liudongs@aliyun.com
 *
 * 承载货物重量计算
 * 计算公式：60000*105%-车头整备质量-车挂整备质量-800kg = 承载货物重量
 * 计算单位：kg
 */
public class GoodsWeightCountUtils {

    //配件重量
    private final static long ACCESSORIESWEIGHT = 800L;
    //超限比例
    private final static double OVERLOADEDPROPORTION=1.05;

    public static long goodsWeightCount(long headWeight, long hangWeight, long maxWeight){
        return Double.valueOf(maxWeight*OVERLOADEDPROPORTION-headWeight-hangWeight-ACCESSORIESWEIGHT).longValue();
    }
}